package com.my.object;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "major")
public class Major {
	@Id
	@Column(name = "id")
	private int id;
	@Column(name = "code")
	private String code;
	@Column(name = "name")
	private String name;
	@Column(name = "description")
	private String description;
	@Column(name = "college_id")
	private int college_id;

	@OneToMany
	@JoinColumn(name = "major_id")
	private Set<Registeration> registeration;

	public Set<Registeration> getRegisteration() {
		return registeration;
	}

	public void setRegisteration(Set<Registeration> registeration) {
		this.registeration = registeration;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public int getCollege_id() {
		return college_id;
	}

	public void setCollege_id(int college_id) {
		this.college_id = college_id;
	}

	@Override
	public String toString() {
		return "Major [id=" + id + ", code=" + code + ", name=" + name
				+ ", description=" + description + ", college_id=" + college_id
				+ "]";
	}

}
